package kr.hyunist.androidcomplete01saeildamil.ch08;

import kr.hyunist.androidcomplete01saeildamil.*;
import android.app.*;
import android.os.*;
import android.view.*;
import android.view.View.OnTouchListener;
import android.widget.*;

public class HandlerAccess extends Activity {
	TextView tv;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.handleraccess);
		
		LinearLayout linear = (LinearLayout) findViewById(R.id.linear);
		tv = (TextView) findViewById(R.id.handleraccessText);
		
		linear.setOnTouchListener(new OnTouchListener() {
			
			@Override
			public boolean onTouch(View v, MotionEvent event) {
				if(event.getAction() == MotionEvent.ACTION_DOWN){
					tv.setText("지금 나 건드렷냐?");
					return true;
				}
				return false;
			}
		});
	}
}
